#include "HardwareProfile.h"

void KeyProc(void)
{
	unsigned int key;
	unsigned char x;
	key=KeyCheck();
	if(key==NoKey)
		return;
	SleepTick=SystemTick;
	if(gFlags.bAlarm)
	{
		AckWlAddr.DripFrameID=AlarmList[AlarmListIndex].DripFrameID;
		//gFlags.bAlarm=0;
		gFlags.bWaitACK=1;
		//ledFlags.bDP4=!ledFlags.bDP4;
		//Wireless_SetRx();
		//Display_ShowPage();
		gFlags.bAlarm=0;
		ZD_W=0;
		Beep_W=0;
	}
	else
	{
		AlarmListIndex++;
		if(AlarmListIndex>=AlarmListCount)
		{
			AlarmListIndex=0;
		}
		Display_ShowPage();
	}
}


